import java.util.Hashtable;

public class test4 {
    public int[] hashList;

    public test4(){
        hashList = new int[11];
        for (int i=0;i<11;i++){
            hashList[i]=-1;
        }
    }

    public int hash(int key){
        return key%11;
    }

    public void insert(int[] x){
        for (int i=0;i<x.length;i++){
            int key = hash(x[i]);
            if (hashList[key] == -1){
                hashList[key]=x[i];
            }else {
                while (hashList[key]!=-1){
                    key++;
                }
                hashList[key]=x[i];
            }
        }
    }

    public void display(){
        for (int i=0;i<11;i++){
            System.out.print(hashList[i]+" ");
        }
        System.out.println();
    }
}
